#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>

int Fibonacci_sequence(int n)
{
	if (n == 1) 
	{
		return 1;
	}
	else 
	{
		if (n == 2)
		{
			return 1;
		}
		else
		{
			return Fibonacci_sequence(n - 2) + Fibonacci_sequence(n - 1);
		}
	}
	


}


int main()
{	
	int a;
	int b;
	int sum;
	int n;
	scanf("%d", &n);
	printf("%d\n", Fibonacci_sequence(n));
	for (int i = 0; i < n; ++i)
	{
		
		
		if (i == 0 || i == 1)
		{
			sum = 1;
			a = sum;
		}
		else
		{
			b = sum;
			sum = a + sum;
			a = b;

		}
	}
	printf("%d\n", sum);
	return 0;
}